package com.jason.bookworm.response;

public enum StatusEnum {
    //成功状态
    Login_OK(20001,"登录成功！"),
    Register_OK(20002,"注册成功！"),
    Logout_OK(20003,"已退出登录！"),
    POST_OK(20004,"提交成功！"),
    GET_OK(20005,"获取成功！"),
    DELETE_OK(20006,"删除成功！"),
    PUT_OK(20007,"更新成功！"),

    //失败状态
    Login_ERR(40001,"登录失败！"),
    Register_ERR(40002,"注册失败！"),
    Access_Denied(40003,"拒绝访问！"),
    Unknown_Request(40004,"未知请求！"),
    POST_ERR(40005,"提交失败！"),
    GET_ERR(40006,"获取失败！"),
    DELETE_ERR(40007,"删除失败！"),
    PUT_ERR(40008,"更新失败！"),

    //错误状态
    System_ERR(50001,"服务器内部错误！"),
    System_Busy(50002,"系统忙！"),
    Response_Timeout(50003,"响应超时！"),
    Token_Illegal(50004,"Token非法！"),
    Not_Login(50005,"用户未登录！"),
    Illegal_DATA(50006,"非法数据！"),


    ;
    private int code;
    private String msg;

    StatusEnum(int code, String msg) {
        this.code=code;
        this.msg=msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
